<template>
  <div class="wrapper">
    <v-head></v-head>
    <v-sidebar :sideList ="sideList"></v-sidebar>

    <div class="content-box" :class="{'content-collapse':collapse}">
      <div class="content">
        <transition name="move" mode="out-in">
          <keep-alive :include="tagsList">
            <router-view :items="staff"></router-view>
          </keep-alive>
        </transition>
        <el-backtop target=".content"></el-backtop>
      </div>
    </div>
  </div>
</template>

<script>
  import Global from '../utils/global'
  import vHead from '../components/common/Header'
  import vSidebar from '../components/common/Sidebar'
  import vTags from '../components/common/Tags'
  import SelfInfo from '../components/common/SelfInfo'
  import bus from '../components/common/bus'
  import CommitManageSuper from '../components/super/CommitManageSuper'
  import ProjectManageSuper from '../components/super/ProjectManageSuper'
  import SalaryManageSuper from '../components/super/SalaryManageSuper'
  import UploadFileManageSuper from '../components/super/UploadFileManageSuper'
  import WageManageSuper from '../components/super/WageManageSuper'

  export default {
    name: 'Super',
    data(){
      return{
        collapse: false,
        staff:null,
        tagsList: [],
        glo:new Global,
        sideList://============sidelist//似乎不能动态的改变这个   呜呜呜
          [
            {
              icon:'el-icon-user-solid',
              index:'SelfInfoSuper',//这里 应该是router-link
              title:'个人信息'
            },
            {
              icon:'el-icon-circle-plus-outline',
              index:'ProManAddClientSuper',
              title:'新增客户'
            },
            {
              icon:'el-icon-s-custom',
              index:'ClientManageSuper',
              title:'客户管理'
            },
            {
              icon:'el-icon-circle-plus',
              index:'ProManAddStaffSuper',
              title:'新增员工'
            },
            {
              icon:'el-icon-user',
              index:'StaffManageSuper',
              title:'员工管理'
            },
            {
              icon:'el-icon-s-order',
              index:'StaffWork',
              title:'员工工作情况'
            },
            {
              icon:'el-icon-circle-plus-outline',
              index:'AddProjectSuper',
              title:'创建项目'
            },
            {
              icon:'el-icon-menu',
              index:'ProjectManageSuper',
              title:'项目管理'
            },
            {
              icon:'el-icon-document-copy',
              index:'CommitManageSuper',
              title:'提交日志管理'
            },
            {
              icon:'el-icon-document',
              index:'UpLoadFileManageSuper',
              title:'上传日志管理'
            },
            {
              icon:'el-icon-eleme',
              index:'SalaryManageSuper',
              title:'工资管理',
              subs:[{
                index:'WageManageSuper',
                title:'1.绩效'
              },{
                index:'SalaryManageSuper',
                title:'2.工资'
              }]
            },
          ]
      }
    },
    components: {
      SelfInfo,
      vHead,
      vSidebar,
      vTags,

    },
    methods:{

    },
    created () {
      bus.$on('collapse-content', msg => {
        this.collapse = msg;
      });
    },
  }
</script>

<style scoped>

</style>
